Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/util-base64

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/util-base64

A Base64 <-> UInt8Array converter

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3M
decreased by-80.77%
Maintainers
2
Weekly downloads
 
Created

What is @smithy/util-base64?

The @smithy/util-base64 package provides utilities for encoding and decoding strings or binary data to and from Base64. It is designed to be a lightweight and efficient solution for handling Base64 encoding in JavaScript applications, particularly useful in contexts where manipulating binary data is necessary.

What are @smithy/util-base64's main functionalities?

Encoding a string to Base64

This feature allows you to encode a plain string into its Base64 representation. It's particularly useful for encoding data that needs to be safely transmitted over a network or stored in a way that is not human-readable.

"use strict";
const { toBase64 } = require('@smithy/util-base64');
const encoded = toBase64('Hello, world!');
console.log(encoded); // Outputs: SGVsbG8sIHdvcmxkIQ==

Decoding a Base64 string

This feature enables the decoding of a Base64 encoded string back into its original string format. It's essential for retrieving the original data from a Base64 encoded string, especially when the data needs to be processed or displayed.

"use strict";
const { fromBase64 } = require('@smithy/util-base64');
const decoded = fromBase64('SGVsbG8sIHdvcmxkIQ==');
console.log(decoded); // Outputs: Hello, world!

Other packages similar to @smithy/util-base64

FAQs

Package last updated on 14 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc